
package com.mobapping;

import java.util.ArrayList;

import android.os.Handler;

public class WebAdapterSim implements IDataAdapter {
	
//	private static final String NAMESPACE2 = "http://www.mekya.com/labs/";
	
//	private static final String pharmacyURL = "http://www.mekya.com/labs/eczane.xml"; 	

	
	public void getElements(final int id,final IArrayListDataListener dataListener) 
	{
		Thread thread = new Thread()
		{
			Handler handler = new Handler();
			ArrayList<Object> pharmacies = new ArrayList<Object>();
			@Override
			public void run() {
				

//		            pharmacies.add(new ElementInfo("Ank9ara", "dsfdsf", "0505050", true,1,0,0, "http://sehirrehberi.ibb.gov.tr/Default.aspx?&ap=istanbulresim&cx=94582&cy=103481&scl=8"));          
//		            pharmacies.add(new ElementInfo("Is9tanbul", "", "", false,4,-121084095,38422006, ""));            	
//		            pharmacies.add(new ElementInfo("A9lperen Eczanesi", "Batikent", "0900 900 999",true, 2,-121084095,36422006, ""));            	
//		            pharmacies.add(new ElementInfo("9Ulas Eczanesi", "Tunali", "444 0 900", true, 3,-121084095,35422006, ""));            	
//		            pharmacies.add(new ElementInfo("Anka8ra", "", "", false,1,39.92,32.82, ""));          
//		            pharmacies.add(new ElementInfo("Ist8anbul", "", "", false,4,-121084095,38422006, ""));            	
//		            pharmacies.add(new ElementInfo("Al8peren Eczanesi", "Batikent", "0900 900 999",true, 2,-121084095,36422006, ""));            	
//		            pharmacies.add(new ElementInfo("U8las Eczanesi", "Tunali", "444 0 900", true, 3,-121084095,35422006, ""));            	
					
		           
		            
		            
		            
					dataListener.dataArrived(pharmacies);
			}
		};
		thread.start();	
	}
	
	//private Pharmacy getPharmacyObject(SoapObject object) 
	//{
	//	Object Name = object.getProperty("NAME");
    //	Object Address = object.getProperty("ADDRESS");   
    //	Object Phone = object.getProperty("PHONE");   
    //	return new Pharmacy(Name.toString(), Address.toString(), Phone.toString(), 0);    
	//}


	public void search(String text, int parentId,final IArrayListDataListener dataListener) {
		// TODO Auto-generated method stub
		Thread thread = new Thread()
		{
			Handler handler = new Handler();
			ArrayList<Object> pharmacies = new ArrayList<Object>();
			@Override
			public void run() {
				
		           
					dataListener.dataArrived(pharmacies);
			}
		};
		thread.start();	
	}

	@Override
	public void search(double coordX, double coordY, int range, final IArrayListDataListener dataListener) {
		Thread thread = new Thread()
		{
			Handler handler = new Handler();
			ArrayList<Object> pharmacies = new ArrayList<Object>();
			@Override
			public void run() {
				
		        
		            
		            
					dataListener.dataArrived(pharmacies);
			}
		};
		thread.start();	
		
	}
		
	

	
	


}
